﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class ActionEditorInterface
{
    public static string OpenFolderPanel(string dataPath)
    {
#if UNITY_EDITOR
        return EditorUtility.OpenFolderPanel("选择保存路径", dataPath, "");
#endif
        return "";
    }
    public static T LoadAssetAtPath<T>(string path) where T:UnityEngine.Object
    {
#if UNITY_EDITOR
        return AssetDatabase.LoadAssetAtPath<T>(path);
#endif
        return null;
    }
    public static void SelectObj(GameObject targetInspector)
    {
#if UNITY_EDITOR
        EditorGUIUtility.PingObject(targetInspector);
        Selection.activeGameObject = targetInspector;
#endif
    }
}
